﻿@namespace MudBlazor.Charts
@inherits MudRadialChartBase<T, PieChartOptions>
@typeparam T 

<div @attributes="UserAttributes" class="@Classname">
    <BaseRadialChart T="T" 
                     TChartOptions="PieChartOptions"
                     ElementRefChanged="SetElementReference"
                     Width="@Width"
                     Height="@Height"
                     Paths="@_paths"
                     Radius="@Radius"
                     ChartClass="mud-chart-pie"
                     ChartSeries="@ChartSeries"
                     ChartLabels="@ChartLabels"
                     ChartOptions="@ChartOptions"
                     CustomGraphics="@CustomGraphics"
                     HoveredSegment="@_hoveredSegment"
                     UserAttributes="@UserAttributes"
                     TooltipTemplate="@TooltipTemplate"
                     TooltipPositionFunc="@TooltipPositionFunc"
                     OnPathClick="async (i) => await SetSelectedIndexAsync(i)"
                     OnMouseOver="(x) => OnSegmentMouseOver(x.Args, x.Segment)"
                     OnMouseOut="OnSegmentMouseOut" />

    <Legend T="T" Data="@_legends" ShowLegend="@ChartOptions?.ShowLegend" CanHideSeries="@CanHideSeries"
            ChartPalette="@ChartOptions?.ChartPalette" OnLegendSelected="async (i) => await SetSelectedIndexAsync(i)" />
</div>
